<div><input type="button" name="btn_back" value="Back" onclick="history.back(1);" /></div><br />
<div>
<table border="1" width="600" cellpadding="5" cellspacing="0" style="border-collapse:collapse">
	<tr>
    	<td width="10" align="center">Number</td>
        <td width="400" align="center">Answer page</td>
    </tr>
    {section name="qa" loop=$list_questions}
    <tr>
    	<td align="center">{$smarty.section.qa.iteration}</td>
        <td>
        	<div><label><b>Question:</b><br /> {$list_questions[qa].Question}</label><input type="hidden" name="qid[]" value="{$list_questions[qa].QuestionNo}" /><input type="hidden" name="q_model[]" value="{$list_questions[qa].ModelAnswer}" /></div><br />
            <div><b><label>Your answer:</label></b></div>
            {if $list_questions[qa].Answer eq "" || $list_questions[qa].Answer eq null}
            <div>Not answer</div>
            {else}
            	{if $list_questions[qa].ModelAnswer eq 2 || $list_questions[qa].ModelAnswer eq 3}
                	<div>{$list_questions[qa].ta_Option1}</div>
                {elseif $list_questions[qa].ModelAnswer eq 3}
                	<div>{$list_questions[qa].Answer}</div>
                {elseif $list_questions[qa].ModelAnswer eq 0}
                	<div>
                    	{if $list_questions[qa].ta_Option1}{$list_questions[qa].ta_Option1}{/if}
                        {if $list_questions[qa].ta_Option2}{$list_questions[qa].ta_Option2}{/if}
                        {if $list_questions[qa].ta_Option3}{$list_questions[qa].ta_Option3}{/if}
                        {if $list_questions[qa].ta_Option4}{$list_questions[qa].ta_Option4}{/if}
                        {if $list_questions[qa].ta_Option5}{$list_questions[qa].ta_Option5}{/if}
                    </div>    
                {elseif $list_questions[qa].ModelAnswer eq 1}
                	<div>
                    	<ul>
                        	{if $list_questions[qa].ta_Option1}<li>{$list_questions[qa].ta_Option1}</li>{/if}
                            {if $list_questions[qa].ta_Option2}<li>{$list_questions[qa].ta_Option2}</li>{/if}
                            {if $list_questions[qa].ta_Option3}<li>{$list_questions[qa].ta_Option3}</li>{/if}
                            {if $list_questions[qa].ta_Option4}<li>{$list_questions[qa].ta_Option4}</li>{/if}
                            {if $list_questions[qa].ta_Option5}<li>{$list_questions[qa].ta_Option5}</li>{/if}
                        </ul>
                    </div>
                {/if}
            {/if}
            <br />
            <div><b><label>Tutor's feedback:</label></b>&nbsp;<i>{$list_questions[qa].ta_Feedback}</i></div>
            <br />
            <div><b><label>Marks:</label>&nbsp;{$list_questions[qa].ta_Mark}</b></div>
            <br />
        </td>
    </tr>
    {/section}
</table>	
</div>
<br />
<div><b>Average marks: {$average_mark}/100</b></div>
<br /><br />
